<div id="detailContainer" style="width: 100%; text-align: left;">
    <h2 id="detail_title"></h2>
    <table style="left: 0px;">
        <tr>
            <th>Alimento</th><th>Tolera</th><th>Comentarios</th>
        </tr>
        <?php foreach($alimentosTolerancia as $alimento){?>
            <tr class="detail-frame" bgColor="#EAEFA5">
                <td>
                    <?php echo $alimento["AlimentoTolerancia"]["alimento"];?>
                </td>
                <?php foreach($tolerancia as $t){?>
                    <?php if($t['ToleranciaAlimentaria']['alimentos_tolerancia_id'] == $alimento['AlimentoTolerancia']['id']){ ?>
                        <td>
                            <input type="hidden" class="tolerancia" alimentoId="<?php echo $alimento['AlimentoTolerancia']['id'];?>" id="tolera_<?php echo $alimento['AlimentoTolerancia']['id'];?>" />
                                <?php
                                    if($t['ToleranciaAlimentaria']['tolerancia'] == 1) {
                                        $checkSi = "checked='checked'";
                                        $checkNo = "";
                                    }else{
                                        $checkSi = "";
                                        $checkNo = "checked='checked'";
                                    }
                                ?>
                                Si <input disabled="disabled" <?php echo $checkSi; ?> type="radio" id="si_<?php echo $alimento['AlimentoTolerancia']['id'];?>" name="tolera_<?php echo $alimento['AlimentoTolerancia']['id'];?>" value="1" />
                                No <input disabled="disabled" <?php echo $checkNo; ?> type="radio" id="no_<?php echo $alimento['AlimentoTolerancia']['id'];?>" name="tolera_<?php echo $alimento['AlimentoTolerancia']['id'];?>" value="0" />
                        </td>
                        <td>
                            <input readonly="readonly" value="<?php echo $t['ToleranciaAlimentaria']['comentario']; ?>" type="text" id="comentario_<?php echo $alimento['AlimentoTolerancia']['id'];?>" style="width: 300px;" />
                        </td>
                    <?php } ?>
                <?php } ?>
            </tr>
        <?php }?>

        </table>
</div>
